//
//  DeviceMacros.h
//  ThailandBus
//
//  Created by lantaiyuan on 16/7/19.
//  Copyright © 2016年 lantaiyuan. All rights reserved.
//


#ifndef DeviceMacros_h
#define DeviceMacros_h

#pragma mark---全部宽高取得是分辨率（px）
//判断是否为 iPhone 3GS、iPhone 4/4s  ---3.5寸 320x480
#define iphone4 [[UIScreen mainScreen] bounds].size.width == 320.0f && [[UIScreen mainScreen] bounds].size.height == 480.0f

// 判断是否为 iPhone 5/5s/5c  320x568
#define iPhone5_SE [[UIScreen mainScreen] bounds].size.width == 320.0f && [[UIScreen mainScreen] bounds].size.height == 568.0f

// 判断是否为 iPhone 6、iPhone 6s、 iPhone 7、iPhone 8  375x667  4.7吋
#define iPhone6_6s_7_8 [[UIScreen mainScreen] bounds].size.width == 375.0f && [[UIScreen mainScreen] bounds].size.height == 667.0f

// 判断是否为iPhone iPhone 6Plus/iPhone 6sPlus/iPhone 7Plus/iPhone 8Plus 414x736 5.5吋
#define iPhone6Plus_6sPlus_7Plus_8Plus [[UIScreen mainScreen] bounds].size.width == 414.0f && [[UIScreen mainScreen] bounds].size.height == 736.0f
//判断是否为iphone X  2436 x 1125 5.8英寸
#define iPhone8_X [[UIScreen mainScreen] bounds].size.width == 375.0 && [[UIScreen mainScreen] bounds].size.height == 812.0f
// 获取系统版本
#define IOS_SYSTEM_VERSION [[[UIDevice currentDevice] systemVersion] floatValue]


// 大于等于7.0的ios版本
#define iOS7_OR_LATER SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")
// 判断 iOS 8 或更高的系统版本
#define IOS_VERSION_8_OR_LATER (([[[UIDevice currentDevice] systemVersion] floatValue] >=8.0)? (YES):(NO))
// 大于等于8.0的ios版本
#define iOS8_OR_LATER SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")

#define IOS11_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 11.0)
#define IOS10_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 10.0)
#define IOS9_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 9.0)
#define IOS8_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
#define IOS7_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)

//导航栏+状态高度为 88
#define iPhone_X_NavHeight 88
#define iPhone_NavHeight 64
//tabbar 高度
#define iPhone_X_tabbarHeight 83
#define iPhone_tabbarHeight 49

// 状态栏高度
#define STATUS_BAR_HEIGHT 20

// NavBar高度
#define NAVIGATION_BAR_HEIGHT 44

// 状态栏 ＋ 导航栏 高度
#define STATUS_AND_NAVIGATION_HEIGHT ((STATUS_BAR_HEIGHT) + (NAVIGATION_BAR_HEIGHT))

// 屏幕 rect
#define SCREEN_RECT ([UIScreen mainScreen].bounds)

// 除状态栏、导航栏后的高度
#define CONTENT_HEIGHT (SCREEN_HEIGHT - NAVIGATION_BAR_HEIGHT - STATUS_BAR_HEIGHT)

// 除状态栏、导航栏后Frame
#define CONTENT_RECT CGRectMake(0, STATUS_AND_NAVIGATION_HEIGHT, SCREEN_WIDTH, CONTENT_HEIGHT)

// 屏幕分辨率
#define SCREEN_RESOLUTION (SCREEN_WIDTH * SCREEN_HEIGHT * ([UIScreen mainScreen].scale))

// 分隔线高度
#define SEPARATOR_HEIGHT 0.35

#define ASE_KEY @"b49b06a42a63f3d1fcf16bea7331b686"

#endif
